package com.service;

import java.text.ParseException;
import java.util.List;

import com.model.Tag;
import com.model.User;
import com.util.Page;
import com.util.TimeEvent;

public interface UserService {

	public User login(String nameOrEmail, String password);

	public boolean registerUser(User user);

	public Tag addUserTag(String tagName, int userId);

	public void removeUserTag(int tagId, int userId);

	public boolean isNameExist(String name);

	public boolean isEmailExist(String email);

	public void updateUser(User user);

	public User getUserById(int id);

	public String addAttention(int userId, int userById);

	public String removeAttention(int userId, int userById);

	public Page findMyAttensionForPage(int userId, int page, int pageSize);

	public Page findAttensiondMeForPage(int userId, int page, int pageSize);

	public List<Tag> getUserTags(int userId);

	public List<TimeEvent> getUserTimeline(int userId, long lasttime, int pageSize)
			throws ParseException;

	public String addUserAction(String type, String action, int targetId, int userId);

	public Page findActiveUserByPage(int page, int pageSize);
	
	public Page getUserCollect(int userId, int page, int pageSize);

	public int getUserRelation(int id, int userId);

	public List findHotTag(int topN);
	
	public Page findHotUserByPage(int page, int pageSize);

	public boolean isPrivateUrlExist(String privateUrl, int excludeId);

	public User findByPriUrl(String uri);
}
